package com.demo.client.test;

public class ConcreteObserver implements Observer {
    private String name;
    private String state;

    public ConcreteObserver(String name) {
        this.name = name;
    }

    @Override
    public void update(String message) {
        System.out.println(name + " received message: " + message);
        state = message;
    }
}
